#!/bin/bash


echo  "nameserver 172.16.140.116" > /etc/resolv.conf && echo  "nameserver 172.16.140.117" >> /etc/resolv.conf
#更新dns
cat > /etc/salt/minion << EOF
master:
    - salt1.ops.net
    - salt2.ops.net

id: $HOSTNAME
tcp_keepalive: True
tcp_keepalive_idle: 300
tcp_keepalive_cnt: -1
tcp_keepalive_intvl: -1
EOF
#更新minion

sudo rm /etc/salt/pki/minion -rf && sudo chkconfig salt-minion on
sudo service  salt-minion restart
systemctl restart salt-minion
#启动minion客户端
